/*
 * SunSpotApplication.java
 *
 * Created on 2012/11/01 10:44:44;
 */

package spotengine;
import java.io.IOException;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;


/**
 */
public class SunSpotApplication extends MIDlet{

    protected void startApp() throws MIDletStateChangeException {
        try {
            DeviceHandler node = new DeviceHandler();
            node.work();
        } catch (IOException ex) {
        }
        notifyDestroyed();
    }

    protected void pauseApp() {
        // This is not currently called by the Squawk VM
    }

    /**
     * Called if the MIDlet is terminated by the system. It is not called if
     * MIDlet.notifyDestroyed() was called.
     *
     * @param unconditional If true the MIDlet must cleanup and release all
     * resources.
     */
    protected void destroyApp(boolean unconditional) throws MIDletStateChangeException {
    }
}